var list = {}
$(document).ready(function(){
    if(global.communityContent){
        list = global.communityContent
        $('#account').text(list.user_name)
    }
})

$('#resetPwd').on('click',function(){
    var password =  $('#password').val()
    if(password == ''){
        alert('请填写重置密码！')
        return
    }
    if(!list){
        alert('获取信息失败！')
        return
    }
    postAjax(`${global.apiUrl}/Api/Alladmin/yes_user_pwd`,function(res){
        // console.log(res)
        if(res == 1){
            alert('重置密码成功！');   
            $('#password').val('')
        }else{
            alert('重置密码失败！请重试');   
        }
    },{
        id: list.id,
        user_pwd: password
    })
})